package com.runda.partypolicy.app.repository;

import com.google.gson.annotations.SerializedName;

/**
 * author:  RD_CY
 * date:    2017/5/2
 * version: v1.0
 * description: 数据获取结果
 */
public class RepositoryResult<T> {

    private boolean success;
    @SerializedName("code")
    private String code;
    @SerializedName("msg")
    private String msg;

    private T data;

    public boolean isSuccess() {
        return success;
    }

    public void setSuccess(boolean success) {
        this.success = success;
    }

    public String getStatusCode() {
        return code;
    }

    public void setStatusCode(String statusCode) {
        this.code = statusCode;
    }

    public String getMessage() {
        return msg;
    }

    public void setMessage(String message) {
        this.msg = message;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public RepositoryResult() {
    }

    public RepositoryResult(boolean success, String statusCode) {
        this.success = success;
        this.code = statusCode;
    }

    public RepositoryResult(boolean success, String statusCode, String message) {
        this.success = success;
        this.code = statusCode;
        this.msg = message;
    }
}
